// HSS.Forms.Delegates.cs
// ----------------------------------------------------------------------------
// Licensed under the MIT license
// http://www.opensource.org/licenses/mit-license.html
// ----------------------------------------------------------------------------
// HighSpeed-Solutions, LLC
// Copyright (c) 2001-2010
// ----------------------------------------------------------------------------
// File:       Delegates.cs
// Author:     HSS\gbanta
// Created:    08/12/2010
// Modified:   12/23/2010
// ----------------------------------------------------------------------------
namespace HSS.Forms
{
	#region Using Directives

	#endregion

	#region Delegates

	#region DataListView
	/// <summary>
	/// Delegates used to extract a value from an items data
	/// </summary>
	public delegate object ValueGetterDelegate(HSS.Data.IDataContainer itemData);
	/// <summary>
	/// Delegates used to fetch the image that should be shown against this column.
	/// </summary>
	/// <remarks>This is currently only used on the first column</remarks>
	public delegate int ImageGetterDelegate(HSS.Data.IDataContainer itemData);
	/// <summary>
	/// Delegates used to fetch any value that should be stored in the item tag.
	/// </summary>
	/// <remarks>default is null</remarks>
	public delegate object TagGetterDelegate(HSS.Data.IDataContainer itemData);
	/// <summary>
	/// Delegates can be used to convert a field value to a display string,
	/// instead of using the default ToString()
	/// </summary>
	public delegate string ValueToStringConverterDelegate(object value);
	/// <summary>
	/// Delegates used to retrieve the object that is the key of the group to which the given row belongs.
	/// Group keys must be the same type as the field.
	/// </summary>
	public delegate object GroupKeyGetterDelegate(HSS.Data.IDataContainer itemData);
	/// <summary>
	/// Delegates used to convert a group key into a Title for the group
	/// </summary>
	public delegate string GroupKeyToTitleConverterDelegate(object groupKey);
	/// <summary>
	/// The delegate for Creating a New Item
	/// </summary>
	/// <returns>The DialogResult of the users action</returns>
	public delegate System.Windows.Forms.DialogResult NewItemDelegate();
	/// <summary>
	/// The delegate for Editing an Item
	/// </summary>
	/// <returns>The DialogResult of the users action</returns>
	public delegate System.Windows.Forms.DialogResult EditItemDelegate(HSS.Data.IDataContainer itemData);
	/// <summary>
	/// The delegate for Deleting an Item
	/// </summary>
	/// <param name="item">The Item to delete</param>
	/// <param name="PersistChanges">Indicate whether or not the delete operation should be persisted</param>
	public delegate void DeleteItemDelegate(DataListItem item, bool PersistChanges);
	/// <summary>
	/// The delegate for refreshing a list of items
	/// </summary>
	public delegate void RefreshDelegate();
	#endregion

	#region SplashScreen
	/// <summary>
	/// Delegate that points to the method used to write messages to the SplashScreen
	/// </summary>
	/// <param name="message">The message to send</param>
	public delegate void SendInfoCallback(string message);
	/// <summary>
	/// Delegate that points to the method used to write messages to the SplashScreen
	/// </summary>
	/// <param name="message">The message to send</param>
	/// <param name="steps">The number of steps to advance the ProgressBar</param>
	public delegate void SendProgressCallback(string message, int steps);
	/// <summary>
	/// Delegate that points to the method used to initialize the Application
	/// </summary>
	/// <param name="args">Command Line args</param>
	/// <param name="sendInfoCallback">SendInfoCallback</param>
	public delegate void InitInfoCallback(string[] args, SendInfoCallback sendInfoCallback);
	/// <summary>
	/// Delegate that points to the method used to initialize the Application
	/// </summary>
	/// <param name="args">Command Line args</param>
	/// <param name="sendProgessCallback">SendProgressCallback</param>
	public delegate void InitProgressCallback(string[] args, SendProgressCallback sendProgessCallback);
	/// <summary>
	/// Delegate that points to the method used to initialize the Main Form
	/// </summary>
	/// <param name="args">Command Line args</param>
	/// <param name="sendInfoCallback">SendInfoCallback</param>
	/// <returns>The real Main Form of the Application</returns>
	public delegate System.Windows.Forms.Form UIInfoCallback(string[] args, SendInfoCallback sendInfoCallback);
	/// <summary>
	/// Delegate that points to the method used to initialize the Main Form
	/// </summary>
	/// <param name="args">Command Line args</param>
	/// <param name="sendProgessCallback">SendProgressCallback</param>
	/// <returns>The real Main Form of the Application</returns>
	public delegate System.Windows.Forms.Form UIProgressCallback(string[] args, SendProgressCallback sendProgessCallback);
	/// <summary>
	/// ToggleMainFormInfo
	/// </summary>
	/// <param name="args">Command line arguments</param>
	/// <param name="uiInfoCallback">The UIInfoCallback callback</param>
	internal delegate void ToggleMainFormInfo(string[] args, UIInfoCallback uiInfoCallback);
	/// <summary>
	/// ToggleMainFormProgress
	/// </summary>
	/// <param name="args">Command line arguments</param>
	/// <param name="uiProgressCallback">UIProgressCallback callback</param>
	internal delegate void ToggleMainFormProgress(string[] args, UIProgressCallback uiProgressCallback);
	#endregion

	#endregion
}